import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: '/',
    component: () => import('views/Home.vue')
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('views/Home.vue')
  },
  {
    path: '/user/:id',
    name: 'User',
    component: () => import('views/profeil.vue')
  },
  {
    path: '/pins/:type',
    name: 'Pins',
    component: () => import('views/profeil.vue')
  },
  {
    path: '/news',
    name: 'News',
    component: () => import('views/profeil.vue')
  },
  {
    path: '/books',
    name: 'Books',
    component: () => import('views/profeil.vue')
  },
  {
    path: '/events/:location',
    name: 'Events',
    component: () => import('views/profeil.vue')
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/post/:id',
    name: "Post",
    component: () => import('views/PageDetail.vue')
  }
]

const router = new VueRouter({
  mode: 'hash',
  routes
})

export default router
